package com.company.project.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.company.project.common.utils.RestUtil;
import com.company.project.pojo.Rest;
import com.company.project.pojo.ServiceCode;
import com.company.project.pojo.edition.Edition;
import com.company.project.pojo.institution.InstitutionDTO;
import com.company.project.service.EditionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 任建波
 * @since 2019-10-18
 */
@Api(value = "版本号",tags = "版本号")
@Controller
@RequestMapping("/edition")
public class EditionController {

    @Autowired
    EditionService editionService;


    @ApiOperation(value = "获取版本号")
    @RequestMapping(value = "getEditon", method = RequestMethod.GET)
    @ResponseBody
    public Rest getEditon(){
        List<Edition> editionList = editionService.list(null);

        return RestUtil.rest(ServiceCode.CODE_200, "成功" , editionList.get(0));
    }
}

